package com.fc.redis.mapper;

import com.fc.redis.entity.TbOrder2;
import com.fc.redis.entity.TbOrder2Example;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.session.RowBounds;

public interface TbOrder2Mapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    long countByExample(TbOrder2Example example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    int deleteByExample(TbOrder2Example example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    @Delete({
        "delete from tb_order2",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    @Insert({
        "insert into tb_order2 (id, money)",
        "values (#{id,jdbcType=BIGINT}, #{money,jdbcType=INTEGER})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=true, resultType=Long.class)
    int insert(TbOrder2 record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    int insertSelective(TbOrder2 record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    List<TbOrder2> selectByExampleWithRowbounds(TbOrder2Example example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    List<TbOrder2> selectByExample(TbOrder2Example example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    @Select({
        "select",
        "id, money",
        "from tb_order2",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @ResultMap("com.fc.redis.mapper.TbOrder2Mapper.BaseResultMap")
    TbOrder2 selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    int updateByExampleSelective(@Param("record") TbOrder2 record, @Param("example") TbOrder2Example example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    int updateByExample(@Param("record") TbOrder2 record, @Param("example") TbOrder2Example example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    int updateByPrimaryKeySelective(TbOrder2 record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated Sat May 30 09:36:50 CST 2020
     */
    @Update({
        "update tb_order2",
        "set money = #{money,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(TbOrder2 record);

    /**
     * 这是Mybatis Generator拓展插件生成的方法(请勿删除).
     * This method corresponds to the database table tb_order2
     *
     * @mbg.generated
     * @author hewei
     */
    int batchInsert(@Param("list") List<TbOrder2> list);
}